/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ticks.chromedome.commands;

import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import ticks.chromedome.OI;

/**
 *
 * @author Jared
 */
public class ShooterSpeedControl {
    double shooter_speed=0;
    public final static double bridge_speed = 2700;
    public final static double fender_speed = 1600;
    public ShooterSpeedControl() {
        
        
    }

      public void execute() {
          //gets called in all periodic functions
          //could also be threaded, but that would be confusing
        if(OI.getInstance().shooterManualMode()==true && DriverStation.getInstance().isOperatorControl()==true){
            CommandBase.shooter_static.setShooterSpeed((DriverStation.getInstance().getAnalogIn(1))*1000);
            shooter_speed = DriverStation.getInstance().getAnalogIn(1)*1000;
        }
        else{
            CommandBase.shooter_static.setShooterSpeed(CommandBase.robot_global.getAutoShooterSpeed());
            shooter_speed = CommandBase.robot_global.getAutoShooterSpeed();
        }
        SmartDashboard.putDouble("Shooter Speed", shooter_speed);
    }}
